import request from '@/utils/request'

// 查
export const getSysUserList = params =>
  request({
    url: 'admin/permission/user',
    params,
  })

// 删
export const delUser = params =>
  request({
    url: `/admin/permission/user/${params}`,
    method: 'delete',
  })

// 增加
export const addUser = data =>
  request({
    url: 'admin/permission/user',
    data,
    method: 'post',
  })

// 获取列信息
export const getUserInfo = params =>
  request({
    url: `admin/permission/user/${params}`,
  })

// 修改
export const editUser = data =>
  request({
    url: `admin/permission/user/${data.id}`,
    method: 'put',
    data,
  })

export const getRoleAll = () =>
  request({
    url: 'admin/permission/role',
  })
